<?php
/**
 * Created by PhpStorm.
 * User: papa
 * Date: 18/5/10
 * Time: 11:47
 */

namespace app\api\model;


class BannerItem extends BaseModel
{
    protected $hidden = ['banner_id','type','is_use','url','create_time','update_time','id'];

    public function getImgAttr($value,$data){
        $finalUrl = $value;
        if($data['img_origin'] == 0){
            $finalUrl = config('setting.img_prefix').$value;
        }
        return $finalUrl;
    }
}